home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / utility / cops608.zip / BRUCEINI.DOC < prev    next >
Text File  |  1996-05-13  |  8KB  |  193 lines

  1. BRUCEINI.DOC                         1                         Revised: 05/13/96
  2.  
  3. This text file describes what INI files are and how they are supported  by  this
  4. program and other programs by the same author.  INI files  are  always  optional
  5. but they can be very useful.
  6.  
  7. An INI file is a way of specifying parameters for a program that you don't  want
  8. to have to respecify from the command  line  each  time.   This  allows  you  to
  9. override the program defaults automatically.
  10.  
  11. This is very useful if you disagree with the defaults I've established  for  the
  12. routines.  It is also useful in cases where you typically use  the  command  one
  13. way but in fairly regular cases you need to run the command using a whole  bunch
  14. of different parameters.  You can set up one INI file for  your  standard  usage
  15. and then provide a different INI file when it's time  to  run  the  lesser  used
  16. versions.
  17.  
  18. Each of the programs reads an INI file if it can find one.  By default, the  INI
  19. file that is searched for is based on the executable's name but not always. This
  20. is shown below (block declarations and  environmental  variables  are  described
  21. later):
  22.  
  23.         Routine         INI file        Block           Env variable
  24.  
  25.         AV.EXE          AV.INI          [AV]            AV
  26.         BFIND.EXE       BFIND.INI       [BFIND]         BFIND
  27.         CHANGE.EXE      CHANGE.INI      [CHANGE]        CHANGE
  28.         CONVERT.EXE     CONVERT.INI     [CONVERT]       CONVERT
  29.         COPSINCE.EXE    COPSINCE.INI    [COPSINCE]      COPSINCE
  30.         DATES.EXE       DATES.INI       [DATES]         DATES
  31.         DIRCOMP.EXE     DIRCOMP.INI     [DIRCOMP]       DIRCOMP
  32.         DIRTOTAL.EXE    DIRTOTAL.INI    [DIRTOTAL]      DIRTOTAL
  33.         EUMAIL.EXE      EUMAIL.INI      [EUMAIL]        EUMAIL
  34.         FILL.EXE        FILL.INI        [FILL]          FILL
  35.         FILUPDAT.EXE    FILUPDAT.INI    [FILUPDAT]      FILUPDAT
  36.         FIXTEXT.EXE     FIXTEXT.INI     [FIXTEXT]       FIXTEXT
  37.         FORTUNE.EXE     FORTUNE.INI     [FORTUNE]       FORTUNE
  38.         HTMSTRIP.EXE    HTMSTRIP.INI    [HTMSTRIP]      HTMSTRIP
  39.         ISAMFIND.EXE &
  40.           ISAMMAKE.EXE  ISAMFIND.INI    [ISAMFIND]      ISAMFIND
  41.         PAGINATE.EXE    PAGINATE.INI    [PAGINATE]      PAGINATE
  42.         READ.EXE &
  43.           READINIT.EXE &
  44.           READMAKE.EXE &
  45.           READY.EXE     READ.INI        [READ]          READ
  46.         TXTABLE.EXE     TXTABLE.INI     [TXTABLE]       TXTABLE
  47.  
  48. The INI file is an ASCII text file that can be created maintained by hand.   The
  49. commands in the INI file should begin in column 1.  It can consist of:
  50.  
  51.   (a) Command-line parameters
  52.   (b) Comments
  53.   (c) Block declarations
  54.   (d) Special items (vary by routine)
  55.  
  56.  
  57. BRUCEINI.DOC                         2                         Revised: 05/13/96
  58.  
  59. (a)  Command-line parameters:  The INI file can consist or one or  more  command
  60.      line parameters.  In  most  cases,  it  can  *only*  include  command  line
  61.      parameters that begin with a slash ("/").  These will vary  by  routine  of
  62.      course but, in READ for example, your INI file might appear like this:
  63.  
  64.         /MONO
  65.         /-DOS
  66.         /COLOR=123 134 145 156
  67.  
  68. (b)  Comments: The INI file can also contain comment lines.  These  are  defined
  69.      as any lines that  are  either  blank  or  contain  any  of  the  following
  70.      characters in column 1:
  71.  
  72.         (space) (any line that is indented is a comment)
  73.         ;       (semi-colon)
  74.         :       (colon)
  75.         '       (quote)
  76.  
  77. (c)  Block declarations:  You can combine INI files if you'd like.   This  saves
  78.      some disk space.  Typically, this  is  done  in  connection  with  the  SET
  79.      BG=inifile environmental parameter (described below).  Blocks are  declared
  80.      by using the name of searched-for routine  in  brackets.   (See  the  table
  81.      above to  see  what  blocks  are  searched  for  for  each  routine.)   Any
  82.      statements between one block and the next are assumed to be associated with
  83.      the first routine.  For example:
  84.  
  85.         ; ALL.INI -- contains all of the INI statements
  86.         [DATES]
  87.         /SORT
  88.         [FILL]
  89.         /ON
  90.         /SPLIT
  91.         [READ]
  92.         /MONO
  93.  
  94. (d)  Special items:  Some routines allow the INI file to include statements that
  95.      cannot be specified from the command line.  These  special  statements  are
  96.      described in the specific routine's documentation.
  97.  
  98.  
  99. BRUCEINI.DOC                         3                         Revised: 05/13/96
  100.  
  101. Where does each program look for the INI file?
  102.  
  103. Each program here looks for an INI file unless instructed otherwise.  The  logic
  104. used is as follows.  Note that the first "hit" wins:
  105.  
  106. (a)  No INI file is checked for if any of the following is true:
  107.       - /-I or /INULL is passed in from the command line
  108.       - /-I or /INULL is passed in from the routine's environmental parameter
  109.            (e.g. SET READ=/-I)
  110.       - the environmental variable BG is set to the value of /-I or /INULL
  111.            (e.g. SET BG=/-I)
  112.      Most programs accept either  /-I  or  /INULL.   However,  several  routines
  113.      (BFIND and CHANGE) accept /-I to mean do a  case-insensitive  search.   For
  114.      these programs, you *have* to use /INULL instead.
  115.  
  116. (b)  If a /Iinitfile setting is passed in, the routine uses  this  to  determine
  117.      the name of the INI file to look for.  Note that the file name must include
  118.      a period (e.g. "/ICHANGE.INI") or the program will skip it.
  119.  
  120. (c)  The routine looks for an environmental variable BG.  If  this  variable  is
  121.      defined (and it's not set to /-I), then the routine takes this  to  be  the
  122.      name of the INI file to look for.
  123.  
  124. (d)  The routine looks for the INI file under the "INI file" name shown  in  the
  125.      table at the start of this documentation.
  126.  
  127. If the INI file name does not include  either  a  drive  or  path  specification
  128. (e.g., you don't pass in something like /IC:\ALL.INI), the routine  will  search
  129. for the named file.  It will check  for  it  in  the  following  places  in  the
  130. following order.  The first place that it finds it wins:
  131.  
  132.   - Your default subdirectory (where you were when you executed the command)
  133.   - The subdirectory that contains the EXE that you're executing
  134.   - Your regular DOS path
  135.  
  136. If you do not have an INI file, this searching can take awhile especially if you
  137. have any networked drives in your path.  In this  case,  specifying  "/-I"  will
  138. save some time.  Passing in a fully qualified filename also helps.
  139.  
  140.  
  141. BRUCEINI.DOC                         4                         Revised: 05/13/96
  142.  
  143. Personally, I have a common INI file named WAYNE.INI in the root of my C: drive.
  144. I put it there so I don't run out of environmental space by specifying some huge
  145. path.  I have the following statement in my AUTOEXEC.BAT:
  146.  
  147.      SET BG=C:\WAYNE.INI
  148.  
  149. Currently, my C:\WAYNE.INI file looks like this:
  150.  
  151.      [AV]
  152.      /on
  153.      [bfind]
  154.      /-empty
  155.      [COPSINCE]
  156.      /def text=*.bas *.bi *.c *.diz *.doc *.h *.ref *.sas *.sc *.txt
  157.      /def prg=*.bas *.bat *.bi *.c *.h *.sas
  158.      /to c:\temp
  159.      /replace
  160.      /-beep
  161.      /text
  162.      /copy -0
  163.      [DATES]
  164.      /cc:\mine\datemine.txt
  165.      /sort
  166.      /day
  167.      /-i
  168.      [FILL]
  169.      /letter
  170.      [htmstrip]
  171.      /lc:\vbdos\htmstrip.ini
  172.      /-symbols
  173.      /warnings
  174.      [paginate]
  175.      /overwrite
  176.      /cc:\bat\brucedoc.ctl
  177.      [txtable]
  178.      /debug
  179.  
  180. If I ever need to override the WAYNE.INI settings, it's easy to  do  by  passing
  181. them in from the command line or by specifying /-I from the command line.
  182.  
  183.  
  184.                 Bruce Guthrie
  185.                 Wayne Software
  186.                 113 Sheffield St.
  187.                 Silver Spring, MD 20910
  188.  
  189.                 fax: (301) 588-8986
  190.                 e-mail: bguthrie@nmaa.org
  191.                 http://hjs.geol.uib.no/guthrie/
  192. 
  193.